package respons

import "api/internal/types"

// 失败返回参数
func Error(code int, msg string, data interface{}) *types.Response {
	return &types.Response{
		Code:    int64(code),
		Message: msg,
		Data:    data,
	}
}

// 成功返回参数
func Success(data interface{}) *types.Response {
	return &types.Response{
		Code:    200,
		Message: "成功",
		Data:    data,
	}
}
